package com.cssy.xxkj.logic.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.byd.acegiext.domain.User;
import com.cssy.xxkj.logic.dao.LogicAllocatOutwhItemDAO;
import com.cssy.xxkj.logic.entity.LogicAllocatOutwhItemDO;
import com.cssy.xxkj.logic.service.ILogicAllocatOutwhItemService;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;

@Service("logicAllocatOutwhItemService")
public class LogicAllocatOutwhItemServiceImpl implements ILogicAllocatOutwhItemService {
	
	@Resource(name = "logicAllocatOutwhItemDAO")
	LogicAllocatOutwhItemDAO logicAllocatOutwhItemDAO;

	@Override
	public SearchResult findListByExample(SearchConditions scs)
			throws SyBaseException {
		SearchResult rs = new SearchResult(scs);
		List<LogicAllocatOutwhItemDO> list = logicAllocatOutwhItemDAO.find(scs);
		rs.setRecordCount(logicAllocatOutwhItemDAO.count(scs));
		rs.setResults(list);
		return rs;
	}
	
	@Override
	public List<LogicAllocatOutwhItemDO> findListByMap(Map<String, Object> paramMap)
			throws SyBaseException {
		return logicAllocatOutwhItemDAO.findListByMap(paramMap);
	}

	@Override
	public Integer delete(String id, User user) throws SyBaseException {
		return logicAllocatOutwhItemDAO.deleteLogicAllocatOutwhItemDOByPrimaryKey(id);
	}

	@Override
	public Integer update(LogicAllocatOutwhItemDO t, User user)
			throws SyBaseException {
		return logicAllocatOutwhItemDAO.updateLogicAllocatOutwhItemDO(t);
	}

	@Override
	public LogicAllocatOutwhItemDO save(LogicAllocatOutwhItemDO outwh, User user)
			throws SyBaseException {
		logicAllocatOutwhItemDAO.insertLogicAllocatOutwhItemDO(outwh);
		return outwh;
	}

	@Override
	public LogicAllocatOutwhItemDO findListById(String id)
			throws SyBaseException {
		return logicAllocatOutwhItemDAO.findLogicAllocatOutwhItemDOByPrimaryKey(id);
	}

	@Override
	public Integer deleteBizRemoved(String id) throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}

	

}
